<?php
/**
 * 接口控制器基类
 */
class apiAction extends baseAction {
   protected $user_info = null;
   public function _initialize() {
        parent::_initialize();
       //if(!session('user_info')){
		// appid ,appkey ,appscore   
	  // }
		$data = mt_rand(1,10);
		$user_info['name'] = $data;
		$user_info['photo'] = 'images/class/tx_0'.mt_rand(1,5).'.png';
		$user_info['openid'] = $data;
		$user_info['time'] = time();
		$this->user_info = $user_info;
		$this->assign('base_name','http://'.$_SERVER['HTTP_HOST'].'/');
    }
    /**
    * 接口显示
    */
    public function APIreturn($arr) {
		krsort($arr);
		echo json_encode($arr);
		die;
    }
	
}